Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tutorials: avoid error messages in tutorial #636

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Conversation

DaniBodor
Copy link
Collaborator

@DaniBodor DaniBodor commented Aug 5, 2024

fix #635 and #520

  1. update ruff to include the notebooks (tutorials), and lint/format these accordingly
  2. improved the warning messages if individual queries do not process due to errors in the pdf file
    • see comment below for an example of what it currently and previously looked like if there was a faulty file
  3. in addition to this, we uploaded pruned data to Zenodo that omits the queries that are causing errors.
    • I was not able to discover what was wrong with many of the queries. See conversation in fix SRV notebook #635 for details.
    • note that in the workflow it was necessary to provide the link to the specific version of the data (version 2.1). In the tutorials introduction, a link was given that will always refer to the newest data set.

Not sure what the best type-tag for this PR is. "tutorials" isnt formally an angular convention type, but none of the other ones covers it particularly well. I guess "docs" would be closest?

blocking #641, which would like to move ruff settings to separate toml file

@DaniBodor DaniBodor changed the base branch from main to dev August 5, 2024 11:36
Copy link

This PR is stale because it has been open for 14 days with no activity.

@github-actions github-actions bot added the stale issue not touched from too much time label Aug 21, 2024
@DaniBodor DaniBodor removed the stale issue not touched from too much time label Sep 5, 2024
@DaniBodor DaniBodor changed the title 635 tutorials dbodor tutorials: avoid error messages in tutorial Sep 5, 2024
@DaniBodor DaniBodor marked this pull request as ready for review September 5, 2024 12:32
@DaniBodor DaniBodor force-pushed the 635_tutorials_dbodor branch 2 times, most recently from 77c1358 to 151c58c Compare September 5, 2024 14:39
in the workflow it is necessary to link to the exact version of the data. In the tutorials themselves, the link is given that always refers to the newest version
@DaniBodor DaniBodor added the blocking This issue blocks the others label Sep 6, 2024
Copy link
Collaborator

@gcroci2 gcroci2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! The changes in training.ipynb were not really visible here, let me know if I have to rerun that notebook to be sure is all good.

deeprank2/query.py Show resolved Hide resolved
@DaniBodor
Copy link
Collaborator Author

as to 2:
currently, if not all queries are processed, the output will look something like this:

Graph/Query with ID residue-srv:A:78:Valine->Isoleucine:pdb5qip ran into an Exception and was not written to the hdf5 file.
Exception found: ValueError: Residue not found in data_raw/srv/pdb/pdb5qip.ent: A 78.
You may proceed with your analysis, but this query will be ignored.

Graph/Query with ID residue-srv:A:78:Valine->Isoleucine:pdb5qio ran into an Exception and was not written to the hdf5 file.
Exception found: ValueError: Residue not found in data_raw/srv/pdb/pdb5qio.ent: A 78.
You may proceed with your analysis, but this query will be ignored.

Graph/Query with ID residue-srv:A:20:Arginine->Tryptophan:pdb5qis ran into an Exception and was not written to the hdf5 file.
...
You may proceed with your analysis, but this query will be ignored.

Not all queries have been processed. You can proceed with the analysis of 53/72 queries.
Set log_error_traceback to True for advanced troubleshooting

previously, it looked like this:

Graph/Query with ID residue-srv:A:6:Phenylalanine->Cysteine:pdb1tff ran into an Exception (ValueError: Residue not found in data_raw/srv/pdb/pdb1tff.ent: A 6), and it has not been written to the hdf5 file. More details below:
Residue not found in data_raw/srv/pdb/pdb1tff.ent: A 6
Traceback (most recent call last):
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 460, in _process_one_query
graph = query.build(self._feature_modules)
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 192, in build
graph = self._build_helper()
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 275, in _build_helper
raise ValueError(msg)
ValueError: Residue not found in data_raw/srv/pdb/pdb1tff.ent: A 6

Graph/Query with ID residue-srv:A:91:Arginine->Histidine:pdb4zw9 ran into an Exception (ValueError: Residue not found in data_raw/srv/pdb/pdb4zw9.ent: A 91), and it has not been written to the hdf5 file. More details below:
Residue not found in data_raw/srv/pdb/pdb4zw9.ent: A 91
Traceback (most recent call last):
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 460, in _process_one_query
graph = query.build(self._feature_modules)
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 192, in build
graph = self._build_helper()
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 275, in _build_helper
raise ValueError(msg)
ValueError: Residue not found in data_raw/srv/pdb/pdb4zw9.ent: A 91

Graph/Query with ID residue-srv:A:227:Glutamine->Leucine:pdb4zw9 ran into an Exception (ValueError: Residue not found in data_raw/srv/pdb/pdb4zw9.ent: A 227), and it has not been written to the hdf5 file. More details below:
Residue not found in data_raw/srv/pdb/pdb4zw9.ent: A 227
...
graph = self._build_helper()
File "/home/dbodor/git/DeepRank/deeprank2/deeprank2/query.py", line 275, in _build_helper
raise ValueError(msg)
ValueError: Residue not found in data_raw/srv/pdb/pdb5qiz.ent: A 78

@DaniBodor DaniBodor merged commit ea47488 into dev Sep 6, 2024
6 checks passed
@DaniBodor DaniBodor deleted the 635_tutorials_dbodor branch September 6, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking This issue blocks the others
Projects
None yet
2 participants